package com.situation.mapper;

import com.situation.pojo.DO.BizConsumer;
import com.situation.pojo.DO.BizOutStock;
import com.situation.pojo.DO.BizOutStockInfo;
import com.situation.pojo.VO.OutStockVO;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface OutStockMapper {


    /**
     * 删除
     *
     * @param id 主键
     * @return
     */
    int delete(Long id);

    /**
     * 查询所有出库
     *
     * @return
     */
    List<OutStockVO> queryAll(BizOutStock outStock);

    /**
     * @param outNum 发放单号
     * @return
     */
    List<OutStockVO> queryInfo(String outNum);

    /**
     * 发放明细的收货人
     *
     * @param outNum
     * @return
     */
    BizConsumer queryCon(String outNum);


    /**
     * 删除   真删
     *
     * @param outNum
     * @return
     */
    int deleteById(String outNum);


    /**
     * 修改状态
     *
     * @param outNum
     * @return
     */
    int updateStatus(String outNum, int status);


    /**
     * 添加
     * @param outStock
     * @return
     */
    int insert(BizOutStock outStock);

    /**
     * 修改库存
     * @param pNum
     * @param stock
     * @return
     */
    int updateStock(String pNum, Long stock);

    /**
     * 查询库存
     * @param pNum
     * @return
     */
    Long findStock(String pNum);

    /**
     * 查询明细
     * @param outNum
     * @return
     */
    List<BizOutStockInfo> findPnum(String outNum);

}
